package StringJoiner;

import java.util.StringJoiner;

/**
 * ClassName:StringJoinerText002
 * Package:StringJoiner
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/16-19:28
 * @Version:v1.0
 */
public class StringJoinerText002 {
    public static void main(String[] args) {
        StringJoiner sj = new StringJoiner(",", "[", "]");
        sj.add("a").add("b").add("c");
        System.out.println(sj);
        int len = sj.length();//所有字符的总个数
        System.out.println(len);
        String str = sj.toString();//转为字符串
        System.out.println(str);
    }
}
